inherited dtmsc_BackMaster: Tdtmsc_BackMaster
  OldCreateOrder = True
  Left = 582
  Top = 225
  Height = 357
  Width = 598
  inherited adsMaster: TADODataSet
    CursorType = ctStatic
    CommandText = 'select * from  V_sc_BackMaster where 0=1'
    object adsMasterBillID: TStringField
      DisplayLabel = #21333#25454'ID'
      FieldName = 'BillID'
    end
    object adsMasterBillNo: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'BillNo'
    end
    object adsMasterBillDate: TDateTimeField
      DisplayLabel = #21333#25454#26085#26399
      FieldName = 'BillDate'
    end
    object adsMasterBillType: TStringField
      DisplayLabel = #21333#25454#31867#22411
      FieldName = 'BillType'
    end
    object adsMasterBillcategory: TStringField
      DisplayLabel = #21333#25454#31867#21035
      FieldName = 'Billcategory'
    end
    object adsMastercategoryName: TStringField
      DisplayLabel = #21333#25454#31867#21035
      FieldName = 'categoryName'
      Size = 50
    end
    object adsMasterBillFlow: TWordField
      DisplayLabel = #28304#21333#31867#22411
      FieldName = 'BillFlow'
    end
    object adsMasterSourceBillNo: TStringField
      DisplayLabel = #28304#21333#32534#21495
      FieldName = 'SourceBillNo'
    end
    object adsMasterBackType: TStringField
      DisplayLabel = #36864#26009#31867#22411'ID'
      FieldName = 'BackType'
    end
    object adsMasterBackTypeName: TStringField
      DisplayLabel = #36864#26009#31867#22411
      FieldName = 'BackTypeName'
      Size = 50
    end
    object adsMasterDeptID: TStringField
      DisplayLabel = #37096#38376'ID'
      FieldName = 'DeptID'
    end
    object adsMasterProDeptID: TStringField
      DisplayLabel = #30003#35831#37096#38376'ID'
      FieldName = 'ProDeptID'
    end
    object adsMasterProDeptName: TStringField
      DisplayLabel = #30003#35831#37096#38376
      FieldName = 'ProDeptName'
      Size = 50
    end
    object adsMasterProDeptFullName: TStringField
      DisplayLabel = #30003#35831#37096#38376#20840#31216
      FieldName = 'ProDeptFullName'
      Size = 100
    end
    object adsMasterStockID: TStringField
      DisplayLabel = #20179#24211'ID'
      FieldName = 'StockID'
    end
    object adsMasterStockName: TStringField
      DisplayLabel = #20179#24211
      FieldName = 'StockName'
      Size = 50
    end
    object adsMasterInOutType: TStringField
      DisplayLabel = #30003#35831#31867#22411'ID'
      FieldName = 'InOutType'
    end
    object adsMasterInOutTypeName: TStringField
      DisplayLabel = #30003#35831#31867#22411
      FieldName = 'InOutTypeName'
      Size = 50
    end
    object adsMasterStorager: TStringField
      DisplayLabel = #20179#31649
      FieldName = 'Storager'
    end
    object adsMasterBacker: TStringField
      DisplayLabel = #36864#26009#20154
      FieldName = 'Backer'
    end
    object adsMasterHasCheck: TBooleanField
      DisplayLabel = #23457#26680#21542
      FieldName = 'HasCheck'
    end
    object adsMasterChecker: TStringField
      DisplayLabel = #23457#26680#20154
      FieldName = 'Checker'
    end
    object adsMasterCheckTime: TDateTimeField
      DisplayLabel = #23457#26680#26102#38388
      FieldName = 'CheckTime'
    end
    object adsMasterRes_Checker: TStringField
      DisplayLabel = #23457#26680#20154
      FieldKind = fkLookup
      FieldName = 'Res'#31'_Checker'
      LookupDataSet = res_Employee
      LookupKeyFields = 'EmpID'
      LookupResultField = 'EmpName'
      KeyFields = 'Checker'
      Lookup = True
    end
    object adsMasterWriter: TStringField
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object adsMasterWriteTime: TDateTimeField
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object adsMasterModifier: TStringField
      Tag = 1
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsMasterModifyTime: TDateTimeField
      Tag = 1
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsMasterRemark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 500
    end
  end
  inherited adsMasterEdit: TADODataSet
    CursorType = ctStatic
    CommandText = 'select * from  sc_BackMaster'
    object adsMasterEditBillID: TStringField
      DisplayLabel = #21333#25454'ID'
      FieldName = 'BillID'
    end
    object adsMasterEditBillNo: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'BillNo'
    end
    object adsMasterEditBillDate: TDateTimeField
      DisplayLabel = #21333#25454#26085#26399
      FieldName = 'BillDate'
    end
    object adsMasterEditBillType: TStringField
      DisplayLabel = #21333#25454#31867#22411
      FieldName = 'BillType'
    end
    object adsMasterEditBillcategory: TStringField
      DisplayLabel = #21333#25454#31867#21035
      FieldName = 'Billcategory'
    end
    object adsMasterEditBillFlow: TWordField
      DisplayLabel = #28304#21333#31867#22411
      FieldName = 'BillFlow'
    end
    object adsMasterEditRes_BillFlowName: TStringField
      DisplayLabel = #28304#21333#31867#22411
      FieldKind = fkLookup
      FieldName = 'Res_BillFlowName'
      LookupDataSet = res_DrawBillFlow
      LookupKeyFields = 'ID'
      LookupResultField = 'Name'
      KeyFields = 'BillFlow'
      Lookup = True
    end
    object adsMasterEditSourceBillNo: TStringField
      DisplayLabel = #28304#21333#32534#21495
      FieldName = 'SourceBillNo'
    end
    object adsMasterEditBackType: TStringField
      DisplayLabel = #36864#26009#21407#22240
      FieldName = 'BackType'
    end
    object adsMasterEditDeptID: TStringField
      DisplayLabel = #37096#38376'ID'
      FieldName = 'DeptID'
    end
    object adsMasterEditProDeptID: TStringField
      DisplayLabel = #30003#35831#37096#38376'ID'
      FieldName = 'ProDeptID'
    end
    object adsMasterEditStockID: TStringField
      DisplayLabel = #20179#24211'ID'
      FieldName = 'StockID'
    end
    object adsMasterEditInOutType: TStringField
      DisplayLabel = #30003#35831#31867#22411
      FieldName = 'InOutType'
    end
    object adsMasterEditStorager: TStringField
      DisplayLabel = #20179#31649
      FieldName = 'Storager'
    end
    object adsMasterEditBacker: TStringField
      DisplayLabel = #36864#26009#20154
      FieldName = 'Backer'
    end
    object adsMasterEditMaxBillDetailNo: TIntegerField
      DisplayLabel = #26126#32454#26368#22823#27969#27700#21495
      FieldName = 'MaxBillDetailNo'
    end
    object adsMasterEditHasCheck: TBooleanField
      DisplayLabel = #23457#26680#21542
      FieldName = 'HasCheck'
    end
    object adsMasterEditChecker: TStringField
      DisplayLabel = #23457#26680#20154
      FieldName = 'Checker'
    end
    object adsMasterEditCheckTime: TDateTimeField
      DisplayLabel = #23457#26680#26102#38388
      FieldName = 'CheckTime'
    end
    object adsMasterEditWriter: TStringField
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object adsMasterEditWriteTime: TDateTimeField
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object adsMasterEditModifier: TStringField
      Tag = 1
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsMasterEditModifyTime: TDateTimeField
      Tag = 1
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsMasterEditRemark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 500
    end
    object adsMasterEditres_Storager: TStringField
      DisplayLabel = #20179#31649
      FieldKind = fkLookup
      FieldName = 'res_Storager'
      LookupDataSet = res_Employee
      LookupKeyFields = 'EmpID'
      LookupResultField = 'EmpName'
      KeyFields = 'Storager'
      Size = 10
      Lookup = True
    end
    object adsMasterEditres_StoreName: TStringField
      DisplayLabel = #20179#24211
      FieldKind = fkLookup
      FieldName = 'res_StockName'
      LookupDataSet = res_Stock
      LookupKeyFields = 'StockID'
      LookupResultField = 'StockName'
      KeyFields = 'StockID'
      Lookup = True
    end
    object adsMasterEditres_DeptName: TStringField
      DisplayLabel = #30003#35831#37096#38376
      FieldKind = fkLookup
      FieldName = 'res_DeptName'
      LookupDataSet = res_Department
      LookupKeyFields = 'DeptID'
      LookupResultField = 'DeptName'
      KeyFields = 'ProDeptID'
      Size = 100
      Lookup = True
    end
    object adsMasterEditres_DeptFullName: TStringField
      DisplayLabel = #30003#35831#37096#38376#20840#31216
      FieldKind = fkLookup
      FieldName = 'res_DeptFullName'
      LookupDataSet = res_Department
      LookupKeyFields = 'DeptID'
      LookupResultField = 'DeptFullName'
      KeyFields = 'ProDeptID'
      Size = 100
      Lookup = True
    end
    object adsMasterEditres_Backer: TStringField
      DisplayLabel = #36864#26009#20154
      FieldKind = fkLookup
      FieldName = 'res_Backer'
      LookupDataSet = res_Employee
      LookupKeyFields = 'EmpID'
      LookupResultField = 'EmpName'
      KeyFields = 'Backer'
      Lookup = True
    end
    object adsMasterEditres_InOutTypeName: TStringField
      DisplayLabel = #30003#35831#31867#22411
      FieldKind = fkLookup
      FieldName = 'res_InOutTypeName'
      LookupDataSet = res_InOutType
      LookupKeyFields = 'ID'
      LookupResultField = 'Name'
      KeyFields = 'InOutType'
      Lookup = True
    end
    object adsMasterEditRes_Checker: TStringField
      DisplayLabel = #23457#26680#20154
      FieldKind = fkLookup
      FieldName = 'Res'#31'_Checker'
      LookupDataSet = res_Employee
      LookupKeyFields = 'EmpID'
      LookupResultField = 'EmpName'
      KeyFields = 'Checker'
      Lookup = True
    end
    object adsMasterEditres_BackTypeName: TStringField
      DisplayLabel = #36864#26009#31867#22411
      FieldKind = fkLookup
      FieldName = 'res_BackTypeName'
      LookupDataSet = res_BackType
      LookupKeyFields = 'ID'
      LookupResultField = 'Name'
      KeyFields = 'BackType'
      Lookup = True
    end
  end
  object adsDetail: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    OnCalcFields = adsDetailCalcFields
    OnNewRecord = adsDetailNewRecord
    CommandText = 'Select * from sc_BackDetail where 0=1'
    Parameters = <>
    Left = 160
    Top = 32
    object adsDetailID: TStringField
      FieldName = 'ID'
    end
    object adsDetailBillID: TStringField
      Tag = 2
      DisplayLabel = #20851#32852'ID'
      FieldName = 'BillID'
    end
    object adsDetailBillDetailNo: TStringField
      DisplayLabel = #26126#32454#32534#21495
      FieldName = 'BillDetailNo'
    end
    object adsDetailSourceBillDetailID: TStringField
      DisplayLabel = #28304#21333#26126#32454'ID'
      FieldName = 'SourceBillDetailID'
    end
    object adsDetailSourceBillDetailNo: TStringField
      DisplayLabel = #28304#21333#26126#32454#32534#21495
      FieldName = 'SourceBillDetailNo'
    end
    object adsDetailProcessID: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object adsDetailres_ProcessName: TStringField
      DisplayLabel = #31867#22411
      FieldKind = fkLookup
      FieldName = 'res_ProcessName'
      LookupDataSet = res_StuffProcessType
      LookupKeyFields = 'ID'
      LookupResultField = 'Name'
      KeyFields = 'ProcessID'
      Lookup = True
    end
    object adsDetailStuffType: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'StuffType'
    end
    object adsDetailStuffID: TStringField
      DisplayLabel = #29289#26009'ID'
      FieldName = 'StuffID'
    end
    object adsDetailStuffCode: TStringField
      DisplayLabel = #29289#26009#32534#30721
      FieldName = 'StuffCode'
      Size = 50
    end
    object adsDetailStuffName: TStringField
      DisplayLabel = #29289#26009#21517#31216
      FieldName = 'StuffName'
      Size = 100
    end
    object adsDetailSpecs: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'Specs'
      Size = 1000
    end
    object adsDetailBrand: TStringField
      DisplayLabel = #21697#29260
      FieldName = 'Brand'
    end
    object adsDetailBatchNo: TStringField
      DisplayLabel = #25209#21495
      FieldName = 'BatchNo'
    end
    object adsDetailColorName: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
    end
    object adsDetailProperties: TStringField
      Tag = 2
      DisplayLabel = #23646#24615
      FieldName = 'Properties'
    end
    object adsDetailPieceCount: TIntegerField
      DisplayLabel = #20214#25968
      FieldName = 'PieceCount'
    end
    object adsDetailPieceNumber: TBCDField
      DisplayLabel = #27599#20214#25968#37327
      FieldName = 'PieceNumber'
      Precision = 18
      Size = 2
    end
    object adsDetailNumber: TBCDField
      Alignment = taLeftJustify
      DisplayLabel = #25968#37327
      FieldName = 'Number'
      Precision = 18
    end
    object adsDetailUnitID: TStringField
      DisplayLabel = #21333#20301'ID'
      FieldName = 'UnitID'
    end
    object adsDetailres_UnitName: TStringField
      DisplayLabel = #21333#20301
      FieldKind = fkLookup
      FieldName = 'res_UnitName'
      LookupDataSet = res_Unit
      LookupKeyFields = 'UnitID'
      LookupResultField = 'UnitName'
      KeyFields = 'UnitID'
      Lookup = True
    end
    object adsDetailBackNumber: TBCDField
      Alignment = taLeftJustify
      DisplayLabel = #23454#36864#25968#37327
      FieldName = 'BackNumber'
      Precision = 18
      Size = 2
    end
    object adsDetailcal_SubNumber: TFloatField
      Alignment = taLeftJustify
      DisplayLabel = #21097#20313#24212#36864#25968
      FieldKind = fkCalculated
      FieldName = 'cal_SubNumber'
      Calculated = True
    end
    object adsDetailBackStatus: TWordField
      DisplayLabel = #23454#36864#29366#24577
      FieldName = 'BackStatus'
    end
    object adsDetailBackTime: TDateTimeField
      DisplayLabel = #23454#36864#26102#38388
      FieldName = 'BackTime'
    end
    object adsDetailWriter: TStringField
      Tag = 2
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object adsDetailWriteTime: TDateTimeField
      Tag = 2
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object adsDetailModifier: TStringField
      Tag = 2
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsDetailModifyTime: TDateTimeField
      Tag = 2
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsDetailRemark: TStringField
      Tag = 2
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 50
    end
  end
  object res_Employee: TADODataSet
    Active = True
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    CommandText = 'select EmpID, EmpName from V_da_Employee'
    CommandTimeout = 0
    Parameters = <>
    Left = 160
    Top = 168
  end
  object res_Stock: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    CommandText = 'select StockID, StockName from V_da_Stock'
    Parameters = <>
    Left = 272
    Top = 168
  end
  object res_Department: TADODataSet
    Active = True
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 
      '  select SupplyID as DeptID, SupplyShortName as  DeptName, Suppl' +
      'yFullName as  DeptFullName from V_da_DeptCustSupply'
    Parameters = <>
    Left = 272
    Top = 104
  end
  object res_Unit: TADODataSet
    Active = True
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'Select UnitID, UnitName from V_da_Unit'
    Parameters = <>
    Left = 160
    Top = 104
  end
  object adsBrowseDetail: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    OnCalcFields = adsBrowseDetailCalcFields
    CommandText = 'Select * from sc_BackDetail where 0=1'
    Parameters = <>
    Left = 272
    Top = 32
    object StringField1: TStringField
      FieldName = 'ID'
    end
    object StringField2: TStringField
      Tag = 2
      DisplayLabel = #20851#32852'ID'
      FieldName = 'BillID'
    end
    object adsBrowseDetailBillDetailNo: TStringField
      DisplayLabel = #26126#32454#32534#21495
      FieldName = 'BillDetailNo'
    end
    object adsBrowseDetailSourceBillDetailID: TStringField
      DisplayLabel = #28304#21333#26126#32454'ID'
      FieldName = 'SourceBillDetailID'
    end
    object adsBrowseDetailSourceBillDetailNo: TStringField
      DisplayLabel = #28304#21333#26126#32454#32534#21495
      FieldName = 'SourceBillDetailNo'
    end
    object StringField3: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'StuffType'
    end
    object StringField4: TStringField
      Tag = 2
      DisplayLabel = #29289#26009'ID'
      FieldName = 'StuffID'
    end
    object StringField5: TStringField
      DisplayLabel = #29289#26009#32534#30721
      FieldName = 'StuffCode'
      Size = 50
    end
    object StringField6: TStringField
      DisplayLabel = #29289#26009#21517#31216
      FieldName = 'StuffName'
      Size = 100
    end
    object StringField7: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'Specs'
      Size = 1000
    end
    object StringField8: TStringField
      Tag = 2
      DisplayLabel = #25209#21495
      FieldName = 'BatchNo'
    end
    object adsBrowseDetailColorName: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
    end
    object adsBrowseDetailProperties: TStringField
      DisplayLabel = #23646#24615
      FieldName = 'Properties'
    end
    object adsBrowseDetailPieceCount: TIntegerField
      DisplayLabel = #20214#25968
      FieldName = 'PieceCount'
    end
    object adsBrowseDetailPieceNumber: TBCDField
      DisplayLabel = #27599#20214#25968#37327
      FieldName = 'PieceNumber'
      Precision = 18
      Size = 2
    end
    object BCDField2: TBCDField
      Tag = 2
      Alignment = taLeftJustify
      DisplayLabel = #25968#37327
      FieldName = 'Number'
      Precision = 18
    end
    object StringField9: TStringField
      DisplayLabel = #21333#20301'ID'
      FieldName = 'UnitID'
    end
    object StringField10: TStringField
      DisplayLabel = #21333#20301
      FieldKind = fkLookup
      FieldName = 'res_UnitName'
      LookupDataSet = res_Unit
      LookupKeyFields = 'UnitID'
      LookupResultField = 'UnitName'
      KeyFields = 'UnitID'
      Lookup = True
    end
    object BCDField3: TBCDField
      Alignment = taLeftJustify
      DisplayLabel = #23454#36864#25968#37327
      FieldName = 'BackNumber'
      Precision = 18
      Size = 2
    end
    object FloatField1: TFloatField
      Alignment = taLeftJustify
      DisplayLabel = #21097#20313#24212#36864#25968
      FieldKind = fkCalculated
      FieldName = 'cal_SubNumber'
      Calculated = True
    end
    object adsBrowseDetailBackStatus: TWordField
      DisplayLabel = #23454#36864#29366#24577
      FieldName = 'BackStatus'
    end
    object adsBrowseDetailBackTime: TDateTimeField
      DisplayLabel = #23454#36864#26102#38388
      FieldName = 'BackTime'
    end
    object StringField11: TStringField
      Tag = 2
      DisplayLabel = #39318#36755#20154
      FieldName = 'Writer'
    end
    object DateTimeField1: TDateTimeField
      Tag = 2
      DisplayLabel = #39318#36755#26102#38388
      FieldName = 'WriteTime'
    end
    object StringField12: TStringField
      Tag = 2
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object DateTimeField2: TDateTimeField
      Tag = 2
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object StringField13: TStringField
      Tag = 2
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 50
    end
  end
  object frdsDetail: TfrDBDataSet
    DataSet = adsDetail
    Left = 56
    Top = 232
  end
  object adsBackType: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 
      'Select ID, Code, Name from V_sc_BackType'#13#10'where isnull(HasCheck,' +
      '0)=1 and isnull(HasStop,0)=0'#13#10'order by Code'
    Parameters = <>
    Left = 384
    Top = 32
  end
  object res_InOutType: TADODataSet
    Active = True
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'Select ID, Code, Name from V_da_InOutType'
    Parameters = <>
    Left = 384
    Top = 104
  end
  object res_DrawBillFlow: TADODataSet
    Active = True
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'Select ID, Code, Name from V_sc_DrawBillFlow'
    Parameters = <>
    Left = 280
    Top = 232
  end
  object res_BackType: TADODataSet
    Active = True
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'Select ID, Code, Name from V_sc_BackType'
    Parameters = <>
    Left = 160
    Top = 232
  end
  object res_StuffProcessType: TADODataSet
    Active = True
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    CommandText = 'Select ID, Name from V_ck_StuffProcessType'
    Parameters = <>
    Left = 392
    Top = 232
  end
  object adsUserCompany: TADODataSet
    Connection = dtmConnect.conMain
    LockType = ltBatchOptimistic
    CommandText = 
      'select b.DeptID, b.DeptCode, b.DeptName from xt_CompanySet a '#13#10'j' +
      'oin da_Department b on a.CompanyID=b.DeptID'#13#10'where a.UserID=(sel' +
      'ect UserID from xt_Users where UserCode=:UserCode)'
    Parameters = <
      item
        Name = 'UserCode'
        Size = -1
        Value = Null
      end>
    Left = 384
    Top = 168
  end
end
